<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      //let arr = []
      let arr = ['a', 'b', 'c']
      //创建一个长度为7
      let arr2 = new Array(7)

      //push是往数组中添加数据
      arr.push('e')
      //pop是从里面取出数据，从尾部开始区
      let result = arr.pop()
      console.log(result)

      arr.forEach(function (value, index, arr) {
        console.log(value, index)
      })
    </script>
  </body>
</html>
